package com.practice.controller;

import lombok.extern.slf4j.Slf4j;
import jakarta.annotation.Resource;
import com.practice.response.ResponseR;
import com.practice.vo.dashboard.ListCardVo;
import com.practice.service.DashboardService;
import com.practice.vo.dashboard.ListCardParam;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 仪表盘
 *
 * @author: kayn
 * 2025-05-08 10:54
 **/
@Slf4j
@RestController
@RequestMapping(value = "/jiojio/dashboard")
public class DashboardController {

    @Resource
    private DashboardService dashboardService;

    /**
     * 仪表盘卡片列表
     * @return 1
     */
    @RequestMapping(value = "/listCard", method = RequestMethod.POST)
    public ResponseR<ListCardVo> listCard(@RequestBody @Validated ListCardParam param) {
        return dashboardService.listCard(param);
    }
}
